﻿@inherits UmbracoTemplatePage
@{
    Layout = "umbLayout.cshtml";

    var newSongs = Umbraco.Content(1068).Descendants("Song").OrderBy("CreateDate").Reverse().Take(8);

    

    int asdf = 9;
}
<div class="container">
    <div class="row">
        <div class="col-md-3 well">
            @CurrentPage.bodyText
            <br/>
            <div class="fb-like" data-href="http://guitar-greb.com" data-layout="button_count" data-action="like" data-show-faces="false" data-share="true"></div>
        </div>
        <div class="col-md-6">
                <h1>Nýggjastu Sangir</h1><br/>
                @foreach (var song in newSongs)
                {
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <a href="@song.Url">
                                <h2 class="panel-title" style="font-size: 25px;">@song.Name</h2>
                            </a>
                        </div>
                            @{
                                var band = song.Parent;
                            }
                            <div class="panel-body">
                                <a href="@band.Url">
                                    <span><i>bólkur:</i> @band.Name</span><br/>
                                </a>
                                <span>
                                    <i class="glyphicon glyphicon-calendar"></i>
                                    @song.CreateDate
                                </span>
                                @if (!song.IsNull("songMember"))
                                {
                                    <span class="pull-right"><i class="glyphicon glyphicon-user"> </i> @Members.GetById(song.songMember).Name</span>
                                }
                                else
                                {
                                    <span class="pull-right"><i class="glyphicon glyphicon-user"> </i> Ókendur</span>
                                }
                            </div>
                        
                    </div>
                }
        </div>
        <div class="col-md-3 well">
            @Html.Partial("bandsAlfabet")
        </div>
    </div>
    <!-- /.row -->
</div>